home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML Instance.sea / XML Instance / Required / plugins / HTMLWindow.jar / horst / HTMLPane$RenderingThread.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-03-18  |  2.5 KB  |  66 lines

  1. package horst;
  2.  
  3. import java.awt.Rectangle;
  4. import java.io.IOException;
  5. import java.io.Reader;
  6. import java.net.URL;
  7.  
  8. class HTMLPane$RenderingThread implements Runnable {
  9.    // $FF: synthetic field
  10.    private final HTMLPane this$0;
  11.    // $FF: renamed from: u java.net.URL
  12.    URL field_0;
  13.    // $FF: renamed from: r java.io.Reader
  14.    Reader field_1;
  15.  
  16.    HTMLPane$RenderingThread(HTMLPane this$0, Reader r, URL u) {
  17.       this.this$0 = this$0;
  18.       this.this$0 = this$0;
  19.       this.field_1 = r;
  20.       this.field_0 = u;
  21.    }
  22.  
  23.    HTMLPane$RenderingThread(HTMLPane this$0, URL u) {
  24.       this.this$0 = this$0;
  25.       this.this$0 = this$0;
  26.       this.field_0 = u;
  27.    }
  28.  
  29.    public void run() {
  30.       if (this.field_1 == null && this.field_0 != null) {
  31.          this.this$0.loadImageContent(this.field_0);
  32.          this.this$0.repaint();
  33.       } else {
  34.          this.this$0.m_rootView = null;
  35.          this.this$0.scrollRectToVisible(new Rectangle(0, 0, 1, 1));
  36.          this.this$0.m_props.m_loadedPage = this.this$0.m_document.getURL();
  37.          if (this.this$0.m_document.m_refreshURL != null) {
  38.             try {
  39.                this.this$0.syncOpenPage(this.this$0.m_document.m_refreshURL);
  40.             } catch (IOException var5) {
  41.             }
  42.          } else {
  43.             Element root = this.this$0.m_document.getRootElement();
  44.             if (root != null) {
  45.                this.this$0.createViews(root);
  46.                this.this$0.forceLayout();
  47.             }
  48.  
  49.             this.this$0.notifyStatusListeners(5, this.this$0.m_props.m_loadedPage);
  50.             if (this.this$0.m_props.m_loadedPage != null) {
  51.                String urlStr = this.this$0.m_props.m_loadedPage.toString();
  52.                int idx = urlStr.indexOf("#");
  53.                if (idx != -1) {
  54.                   Element elem = this.this$0.m_document.getAnchor(urlStr.substring(idx + 1));
  55.                   if (elem != null && elem.m_p0 >= 0) {
  56.                      HTMLPane.access$0(this.this$0, elem.m_p0);
  57.                   }
  58.                }
  59.             }
  60.          }
  61.  
  62.          this.this$0.repaint();
  63.       }
  64.    }
  65. }
  66.